package cn.tedu.csmall.product.preload;


import cn.tedu.csmall.product.mapper.AlbumMapper;
import cn.tedu.csmall.product.pojo.vo.AlbumListItemVo;
import cn.tedu.csmall.product.repo.IAlbumRedisRepository;
import cn.tedu.csmall.product.service.AlbumService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import java.util.List;

@Slf4j
@Component
public class CachePreload implements ApplicationRunner {

    @Autowired
    private AlbumService service;


    @Override
    public void run(ApplicationArguments args) throws Exception {
        service.rebuildCache();
    }

}
